<style>
    #expert-detail {
        padding: 20px 25px 25px 0;
    }

    #expert-detail span {
        margin: 0 0 2px 3px !important;
    }

    .layui-layer-page .layui-layer-content {
        overflow: visible !important;
    }
</style>
<div class="layui-fluid" id="expert-detail">
    <form class="layui-form" lay-filter="expert-detail-form">
        <div class="layui-form-item website-hide">
            <label class="layui-form-label website-form-item-require">专家id：</label>
            <div class="layui-input-block">
                <input type="text" name="expertId" data-th-value="${expert.expertId}">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-col-md6">
                <label class="layui-form-label website-form-item-require">专家姓名：</label>
                <div class="layui-input-block">
                    <input type="text" name="name" readonly class="layui-input">
                </div>
            </div>
            <div class="layui-col-md6">
                <label class="layui-form-label website-form-item-require">学科分类：</label>
                <div class="layui-input-block">
                    <input type="text" name="subjectTypeCode" readonly class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-col-md6">
                <label class="layui-form-label website-form-item-require">所属单位：</label>
                <div class="layui-input-block">
                    <input type="text" name="company" readonly class="layui-input">
                </div>
            </div>
            <div class="layui-col-md6">
                <label class="layui-form-label">固定电话：</label>
                <div class="layui-input-block">
                    <input type="tel" name="phone" readonly class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label website-form-item-require">证件类型：</label>
                    <div class="layui-input-block">
                        <input type="text" name="identityTypeCode" readonly class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label website-form-item-require">证件号：</label>
                    <div class="layui-input-block">
                        <input type="text" name="identityId" readonly class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">银行帐号开户行：</label>
                    <div class="layui-input-block">
                        <input type="text" name="bankName" readonly class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">银行帐号：</label>
                    <div class="layui-input-block">
                        <input type="text" name="accountId" readonly class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label website-form-item-require">理论与实务专家：</label>
                    <div class="layui-input-block">
                        <input type="text" name="featureTypeCode" readonly class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label website-form-item-require">京内与京外专家：</label>
                    <div class="layui-input-block">
                        <input type="text" name="districtTypeCode" readonly class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label website-form-item-require">邮箱：</label>
                    <div class="layui-input-block">
                        <input type="text" name="email" readonly class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label website-form-item-require">移动手机：</label>
                    <div class="layui-input-block">
                        <input type="text" name="mobile" readonly class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">通讯地址：</label>
                    <div class="layui-input-block">
                        <input type="text" name="address" readonly class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label website-form-item-require">学术委员会成员：</label>
                    <div class="layui-input-block">
                        <input type="text" name="isMember" readonly class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label website-form-item-require">职称：</label>
                    <div class="layui-input-block">
                        <input type="text" name="titleTypeCode" readonly class="layui-input">
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>

<script data-th-inline="javascript">
    layui.use(['form', 'formSelects', 'dict'], function () {
        var $ = layui.$,
            formSelects = layui.formSelects,
            dict = layui.dict,
            form = layui.form,
            expert = [[${expert}]];
        form.render();
        initExpertValue();
        formSelects.render();

        function initExpertValue() {
            let subjectTypeCode = dict.getByCode(expert.subjectTypeCode);

            let featureTypeCode = dict.getByCode(expert.featureTypeCode);
            let districtTypeCode = dict.getByCode(expert.districtTypeCode);
            let identityTypeCode = dict.getByCode(expert.identityTypeCode);

            let subjectName = "";
            let featureName = "";
            let districtName = "";
            let identityName = "";

            if (subjectTypeCode) {
                subjectName = subjectTypeCode.name;
            }
            if (featureTypeCode) {
                featureName = featureTypeCode.name;
            }
            if (districtTypeCode) {
                districtName = districtTypeCode.name;
            }
            if (identityTypeCode) {
                identityName = identityTypeCode.name;
            }
            form.val("expert-detail-form", {
                "expertId": expert.expertId,
                "name": expert.name,
                "subjectTypeCode": subjectName,
                "company": expert.company,
                "titleTypeCode": expert.titleTypeCode,
                "featureTypeCode": featureName,
                "districtTypeCode": districtName,
                "identityId": expert.identityId,
                "identityTypeCode": identityName,
                "accountId": expert.accountId,
                "bankName": expert.bankName,
                "accountCode": expert.accountCode,
                "phone": expert.phone,
                "email": expert.email,
                "mobile": expert.mobile,
                "isMember": expert.isMember ? '是' : '否',
                "address": expert.address
            });
        }
    });
</script>